package com.winsdom.entity.customer;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 企业联系人信息
 * 用于存储和传输企业客户的联系人相关信息
 */
@Data
@ApiModel(value = "ContactInfo", description = "企业联系人信息")
public class ContactInfo {

    @ApiModelProperty(value = "联系人ID", example = "1", notes = "新增联系人时不需要提供，系统自动生成")
    private Long contactId;

    @ApiModelProperty(value = "联系人姓名", example = "张三", required = true)
    @NotBlank(message = "联系人姓名不能为空")
    @Size(max = 50, message = "联系人姓名长度不能超过50个字符")
    private String contactName;

    @ApiModelProperty(value = "联系人手机号", example = "13800138000", required = true)
    @NotBlank(message = "联系人手机号不能为空")
    @Size(max = 20, message = "手机号长度不能超过20个字符")
    private String contactMobile;

    @ApiModelProperty(value = "联系人邮箱", example = "zhangsan@example.com")
    @Email(message = "邮箱格式不正确")
    @Size(max = 100, message = "邮箱长度不能超过100个字符")
    private String contactEmail;

    @ApiModelProperty(value = "接收属性列表", example = "[\"报价单\", \"订单通知\"]",
            notes = "可选值：报价单、订单通知、发货通知、发票信息、对账单")
    @NotNull(message = "接收属性列表不能为空")
    @Size(min = 1, message = "至少选择一个接收属性")
    private List<String> receiveProperties;
}